import { Pipe, PipeTransform } from '@angular/core';

@Pipe({
  name: 'gender'
})
export class GenderPipe implements PipeTransform {

  transform(value:string,lang="zh"): string {
    if(lang === 'zh') {
      if(value === '1') {
      return '男'
    }
    if(value === '0') {
      return '女'
    }
    }
    if(lang==='en'){
      if(value === '1') {
      return 'man'
    }
    if(value === '0') {
      return 'woman'
    }
    }
    return '暂无'
  }

}
